<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>

<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>

<xsl:template match='nbsp' name='nbsp'>
<xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
</xsl:template>

<xsl:template match="staff">

<TABLE class="body" cellSpacing="0" cellPadding="0"  border="0" width="100%">

	<xsl:for-each select="member">
		<TR vAlign="top"> 
			<TD align="center" style="padding:5px; border-bottom: 1px solid lightgray;" bgcolor="white" valign="bottom">

		<xsl:choose>
			<xsl:when test="count(@thumb) &gt; 0 and count(@splash) &gt; 0">
				<center><a href="/showUserPics.aspx?userGuid={@userid}"><img border="0" src="/imgs/user/thumb/{@thumb}"/></a></center>
			</xsl:when>
			<xsl:when test="count(@thumb) &gt; 0 and count(@splash) = 0">
				<center><img border="0" src="/imgs/user/thumb/{@thumb}"/></center>
			</xsl:when>
			<xsl:when test="count(@thumb) = 0 and count(@splash) = 0 and count(@picname) &gt; 0">
				<center><a href="/showUserPics.aspx?userGuid={@userid}"><img border="0" src="/imgs/user/thumb/{@thumb}"/></a></center>
			</xsl:when>
			<xsl:otherwise>
			</xsl:otherwise>
		</xsl:choose>

			</TD>
			<TD align="left" style="padding-left:20px; padding:5px; border-bottom: 1px solid lightgray;" bgcolor="white" valign="middle">

			<div style="font-weight:bold; padding-bottom:3px;"><xsl:value-of select="@title"/></div>
			<div style="padding-bottom:10px;"><xsl:value-of select="@descr"/></div>
			<nobr>
			<xsl:choose>
			<xsl:when test='floor( @uStatus div 4096 ) mod 2'><img src="/imgs/listboy.gif"/></xsl:when>
			<xsl:when test='floor( @uStatus div 16 ) mod 2 and (@sexid="24" or @sexid="26")'><img src="/imgs/ananas_m.gif"/></xsl:when>
			<xsl:when test='floor( @uStatus div 16 ) mod 2 and (@sexid="25" or @sexid="27")'><img src="/imgs/ananas_f.gif"/></xsl:when>
			<xsl:when test='floor( @uStatus div 4 ) mod 2 and (@sexid="24" or @sexid="26")'><img src="/imgs/frag_m.gif"/></xsl:when>
			<xsl:when test='floor( @uStatus div 4 ) mod 2 and (@sexid="25" or @sexid="27")'><img src="/imgs/frag_f.gif"/></xsl:when>
			<xsl:when test='floor( @uStatus div 32 ) mod 2'><img src="/imgs/mela.gif"/></xsl:when>
		   <xsl:when test='floor( @uStatus div 2048 ) mod 2'><img style="margin-left: 1px;" src="/imgs/camera.gif"/></xsl:when>
			<xsl:when test='floor( @uStatus div 1024 ) mod 2'><img src="/imgs/gfx.gif"/></xsl:when>
			</xsl:choose>
			&#160;
			<a class="nick" href="/profileShow.aspx?userGuid={@userid}">
			<xsl:value-of select="@nick"/>
			</a>
        
        
		<xsl:variable name="userid" select="@userid"/>
        
		<xsl:choose>
			<xsl:when test='count(/staff/onlineusers/freak/user[@userid = $userid])'>
            <img style="float:left;margin-left:10px;margin-top:2px;" src="/imgs/online.gif"/><div class="segue" style="position:relative;top:0px;left:4px;padding:1px;">Online</div>
			</xsl:when>
			<xsl:otherwise>
            <img style="float:left;margin-left:10px;margin-top:2px;" src="/imgs/offline.gif"/><div class="segue" style="position:relative;top:0px;left:4px;padding:1px;">Offline</div>
			</xsl:otherwise>
		</xsl:choose>
			</nobr>
			</TD>
		</TR>

		<TR vAlign="top"> 
			<TD align="right" style="padding:5px; border-bottom: 1px solid;" bgcolor="white" valign="middle">Votalo
			</TD>
			<TD align="left" style="padding-left:20px; padding:5px; border-bottom: 1px solid;" bgcolor="white" valign="middle">
				<ul class='star-rating'>
					<li class='current-rating' style='width:{(@vt div @wt)*25}px;' id="current-rating{position()}">Currently 3.5/5 Stars.</li>
					<li><a onclick="javascript:ratethis(this.parentNode, '1', '{@userid}', {position()}); return false;" href='javascript:void(null);' title='1 star out of 5' class='one-star'>1</a></li>
					<li><a onclick="javascript:ratethis(this.parentNode, '2', '{@userid}', {position()}); return false;" href='javascript:void(null);' title='2 stars out of 5' class='two-stars'>2</a></li>
					<li><a onclick="javascript:ratethis(this.parentNode, '3', '{@userid}', {position()}); return false;" href='javascript:void(null);' title='3 stars out of 5' class='three-stars'>3</a></li>
					<li><a onclick="javascript:ratethis(this.parentNode, '4', '{@userid}', {position()}); return false;" href='javascript:void(null);' title='4 stars out of 5' class='four-stars'>4</a></li>
					<li><a onclick="javascript:ratethis(this.parentNode, '5', '{@userid}', {position()}); return false;" href='javascript:void(null);' title='5 stars out of 5' class='five-stars'>5</a></li>
				</ul>
				<div id="ratingcaption{position()}" class="b10b" style="color:lightgrey">
				<xsl:choose>
					<xsl:when test='@vt &gt; 0'>
						punteggio: <xsl:value-of select="format-number( @vt div @wt, '0.##')"/>
					</xsl:when>
					<xsl:otherwise>
						nessun voto
					</xsl:otherwise>
				</xsl:choose>
				<xsl:choose>
					<xsl:when test='@yourrating'>
						, il tuo voto <xsl:value-of select="@yourrating"/>
					</xsl:when>
					<xsl:when test='@vt &gt; 0'>
						, <span style="color:grey;">non hai ancora votato</span>
					</xsl:when>
					<xsl:otherwise>
					</xsl:otherwise>
				</xsl:choose>
				</div>
			</TD>
		</TR>

	</xsl:for-each>

</TABLE>


</xsl:template>

</xsl:stylesheet>